import { reactive, ref } from "vue";

export default function InitHook() {
  const searchForm = reactive<Partial<GrossProfit.SearchForm>>({
    companyId: "",
    waybillNums: "",
    customerIdList: [],
    customerNames: "",
    channelIdList: [],
    outWarehouseBrokerId: undefined,
    bizId: undefined,
    accountPeriodIdList: [],
    checkingStatus: undefined,
    // driverUserIdList: [],
    depositTime: [],
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const footerText = ref<string>("");
  const tableData = ref<Array<MaterialIndex.ListRows>>([]);
  const tableRef = ref<any>(null);
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  return {
    searchForm,
    tableData,
    dialogOpts,
    tableRef,
    footerText
  };
}
